import math

#验证该数n是否为质数
def zhishu(n):
    if n<=1:
        return False
    #若存在有小于根号n的因数存在，说明其不为质数
    for i in range(2,int(math.sqrt(n))+1):
        if n % i == 0:
            return False
    return True

def gdbh_guess(ret):
    temp = 1
    for j in range(4,ret+1,2):
        mid = 0
        for k in range(2,j):
            if zhishu(k):
                x = j-k
                if zhishu(x):
                    mid = 1
                    break
        if not mid:
            temp = 0
            print("哥德巴赫猜想在%d处不成立"%j)
            break
    if temp == 1:
        print("歌德巴赫猜想 在1~%d区间内成立"%ret)

q = 10000
gdbh_guess(q)